package org.cyzy.service.impl;

import org.cyzy.entity.CreateClass;
import org.cyzy.mapper.ClassMapper;
import org.cyzy.service.ClassService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassServceImpl implements ClassService {
    private static final Logger logger = LoggerFactory.getLogger(ClassServceImpl.class);

    @Autowired
    private ClassMapper classMapper;

    @Override
    public int insertClass(CreateClass createClass) {
        logger.info("开始插入班级数据: {}", createClass);
        int result = classMapper.insertClass(createClass);
        logger.info("插入完成，影响行数: {}", result);
        return result;
    }

    @Override
    public Integer selectClassCode(String classCode) {
        return classMapper.selectClassCode(classCode);
    }

    @Override
    public CreateClass selectClassInfo(String classCode) {
return null;
    }

    @Override
    public List<CreateClass> selectClassInTeacherid(String teacherId) {
        return List.of();
    }


}